/* Code Mirror Syntax theme for Propel.
 * See syntax_light.scss and syntax_dark.scss for variable defs.
 */

/* Main background color */
.cm-s-syntax,
pre {
  background-color: none;
  color: $base1;
}

.cm-s-syntax.cm-s-dark {
  color: $base0;
  background-color: $base03;
}

.cm-s-syntax.cm-s-light {
  background-color: #fdf6e3;
  color: $base00;
}

.cm-s-syntax .CodeMirror-widget {
  text-shadow: none;
}

.cm-s-syntax .cm-header { color: $base01; }
.cm-s-syntax .cm-quote { color: $base1; }

.cm-s-syntax .cm-keyword { color: $base5; }
.cm-s-syntax .cm-atom { color: $base1; }
.cm-s-syntax .cm-number { color: $base1; }
.cm-s-syntax .cm-def { color: $base0; }

.cm-s-syntax .cm-variable { color: $base0; }
.cm-s-syntax .cm-variable-2 { color: $base4; }

.cm-s-syntax .cm-variable-3,
.cm-s-syntax .cm-type { color: $base1; }

.cm-s-syntax .cm-property { color: $base0; }
.cm-s-syntax .cm-operator { color: $base1; }

.cm-s-syntax .cm-comment {
  color: $base01;
  font-style: italic;
}

.cm-s-syntax .cm-string { color: $base4; }
.cm-s-syntax .cm-string-2 { color: $base4; }

.cm-s-syntax .cm-meta { color: $base4; }
.cm-s-syntax .cm-qualifier { color: $base4; }
.cm-s-syntax .cm-builtin { color: $base1; }
.cm-s-syntax .cm-bracket { color: $base5; }
.cm-s-syntax .CodeMirror-matchingbracket { color: $base4; }
.cm-s-syntax .CodeMirror-nonmatchingbracket { color: $base6; }
.cm-s-syntax .cm-tag { color: $base1; }
.cm-s-syntax .cm-attribute { color: $base0; }

.cm-s-syntax .cm-hr {
  color: transparent;
  border-top: 1px solid $base01;
  display: block;
}

.cm-s-syntax .cm-link {
  color: $base1;
  cursor: pointer;
}
.cm-s-syntax .cm-special { color: $base1; }

.cm-s-syntax .cm-em {
  color: #999;
  text-decoration: underline;
  text-decoration-style: dotted;
}
.cm-s-syntax .cm-strong { color: #eee; }

.cm-s-syntax .cm-error,
.cm-s-syntax .cm-invalidchar {
  color: $base01;
  border-bottom: 1px dotted $base6;
}

.cm-s-syntax.cm-s-dark div.CodeMirror-selected {
  background: $base02;
}

.cm-s-syntax.cm-s-dark.CodeMirror ::selection {
  background: #222;
}

.cm-s-syntax.cm-s-dark .CodeMirror-line::-moz-selection,
.cm-s-dark .CodeMirror-line > span::-moz-selection,
.cm-s-dark .CodeMirror-line > span > span::-moz-selection {
  background: #222;
}

.cm-s-syntax.cm-s-light div.CodeMirror-selected {
  background: $base2;
}

.cm-s-syntax.cm-s-light .CodeMirror-line::selection,
.cm-s-light .CodeMirror-line > span::selection,
.cm-s-light .CodeMirror-line > span > span::selection {
  background: #222;
}

/* Editor styling */

/* Remove gutter border */
.cm-s-syntax .CodeMirror-gutters {
  border-right: 0;
}

/* Gutter colors and line number styling based of color scheme (dark / light) */

/* Dark */
.cm-s-syntax.cm-s-dark .CodeMirror-gutters {
  background-color: $base02;
}

/* Light */
.cm-s-syntax.cm-s-light .CodeMirror-gutters {
  background-color: $base2;
}

.cm-s-syntax .CodeMirror-linenumber { padding: 0 5px; }
.cm-s-syntax.cm-s-dark .CodeMirror-linenumber { color: $base01; }
.cm-s-syntax.cm-s-light .CodeMirror-linenumber { color: $base0; }

/* Common */
.cm-s-syntax .CodeMirror-guttermarker-subtle { color: $base01; }
.cm-s-syntax.cm-s-dark .CodeMirror-guttermarker { color: $base1; }
.cm-s-syntax.cm-s-light .CodeMirror-guttermarker { color: $base5; }

.cm-s-syntax .CodeMirror-gutter .CodeMirror-gutter-text {
  color: $base01;
}

/* Cursor */
.cm-s-syntax .CodeMirror-cursor { border-left: 1px solid #819090; }

/* Fat cursor */
.cm-s-syntax.cm-s-light.cm-fat-cursor .CodeMirror-cursor { background: #7e7; }
.cm-s-syntax.cm-s-light .cm-animate-fat-cursor { background-color: #7e7; }
.cm-s-syntax.cm-s-dark.cm-fat-cursor .CodeMirror-cursor { background: $base01; }
.cm-s-syntax.cm-s-dark .cm-animate-fat-cursor { background-color: $base01; }

/* Active line */
.cm-s-syntax.cm-s-dark .CodeMirror-activeline-background {
  background: rgba(255, 255, 255, 0.06);
}

.cm-s-syntax.cm-s-light .CodeMirror-activeline-background {
  background: rgba(0, 0, 0, 0.06);
}
